package ooday05;
/** static final 常量的演示 */
public class StaticFinalDemo {
    public static void main(String[] args) {
        System.out.println(Loo.PI); //常量尝尝用类名点来访问
        //Loo.PI = 3.1514926;//编译错误,常量不能被改变
    }
}

class Loo{
    public static int num = 5;//静态变量
    public static final int COUNT = 5; //常量(静态常量)
    public static final double PI = 3.14159;
    //public static final int NUM;//编译错误,常量必须声明同时初始化
}